<div id="categories">
<h2>Categories</h2>
    <ul>
      <li><a href="myetat.php"><?php print anchor('./myetat.php','My eTAT');?></a></li>
      <li><a href=""><?php print anchor('survey/','Survey'); ?></a></li>
      <li><a href="">Report</a></li>

    </ul>
    <h2>My Courses</h2>
    <ul>
    <li><a href="javascript:void(0);" onClick="javascript:popup('add-course',null);"><b>Add New Course</b></a></li>
    </ul>

        <?php
		if($courses != null) {
			$count = 0;
			foreach($courses as $c) {
				print "<ul> <li><a href='course.php?c=$c->id'>".ucwords($c->title)."</a>&nbsp;</li></ul>";
			$count++;
	}
} else {
?>
        <p>Looks like you haven't added any courses for monitoring, yet.</p>
        <p>Let's get started by pressing the <b>Add Course</b> button below:</p>
        <?php
}
?>





    <?php


	$form = new Form('add_course_form','post' );
//$form->anchorButton('add-course','Add Course','#',array('type'=>'button','onclick'=>'popup("add-course",null)'));
$form->textInput('title','Course Title ');
$form->textInput('term','Course Term',array(),true);
//$form->textInput('year','',array('value'=>date('Y'),'size'=>'2'),false);
$form->textArea('description','Description (optional)',4,20);
$form->button('add_course_cancel','Cancel',array('type'=>'button','onclick'=>'close_popup();','style'=>'display:inline;' ),true);
$form->button('add_course_submit','Create',array('type'=>'submit','style'=>'display:inline;' ),true);

print popup('add-course',$form->build(),350,array('left'=>300,'top'=>(120+$count*15)));


	?>

    </div>